﻿using Shop.Data.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//La tabla Factura esta echo por Roger ticona nina
namespace Shop.Data.Mapping
{
    public class FacturaMapping:  EntityTypeConfiguration< Factura>
    {
        public FacturaMapping()
        {



            ToTable("Facturas");

            HasKey(t => t.IdFactura);
            Property(t => t.IdFactura)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            Property(t => t.DniCliente).IsRequired();
            Property(t => t.RucCliente).IsRequired();
            Property(t => t.SubTotal).IsOptional();
            Property(t => t.Igv).IsOptional();
            Property(t => t.Total).IsOptional();
            Property(t => t.FechaFactura).IsOptional();


            
        
        
        
        }



    }
}
